<template>
  <div class="analysisTask">
    <userechart
      ref="chart_line_one"
      :options="options"
      :height="height"
      :bordermodel="bordermodel"
      :title="title"
      :iconclass="iconclass"
      :iconcolor="iconcolor"
      :titlecolor="titlecolor"
      :decorationmodel="decorationmodel"
    />
  </div>
</template>

<script>
import userechart from '@/components/echart/index.vue'
export default {
  name: 'gaugechart',
  props: [
    'height',
    'series',
    'bordermodel',
    'title',
    'iconclass',
    'iconcolor',
    'titlecolor',
    'decorationmodel'
  ],
  data() {
    return {
      options: {
        tooltip: {
          formatter: '{a} <br/>{b} : {c}%'
        },
        grid: {
          left: '0%',
          right: '0%',
          bottom: '0%',
          containLabel: true
        },
        series: [
          {
            name: 'Pressure',
            type: 'gauge',
            detail: {
              formatter: '{value}'
            },
            data: [
              {
                value: 50,
                name: 'SCORE'
              }
            ]
          }
        ]
      },
      controlid: ''
    }
  },
  created() {
    this.controlid =
      'div' + Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999)
  },
  mounted() {
    this.initvalue()
    this.$refs.chart_line_one.initChart()
  },
  watch: {},
  methods: {
    initvalue() {}
  },
  components: {
    userechart
  }
}
</script>
